const { Schema, model } = require("mongoose");

const chapterSchema = new Schema({
  chapterId: {
    type: Number,
    unique: true,
  },
  workId: {
    type: Number,
  },
  title: {
    type: String,
    required: true,
    min: 1,
  },
  createdTime: {
    type: Date,
  },
  updateTime: {
    type: Date,
  },
});

module.exports.ChapterModel = model("chapterModel", chapterSchema);
